#include<bits/stdc++.h>
#define sd(n) scanf("%d",&n) 
#define sld(n) scanf("%lld",&n)
#define pd(n) printf("%d", (n))
#define pld(n) printf("%lld", n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
const int N=2e5;
#define INF 0x7fffffff
typedef long long int ll;
using namespace std;
//----------------------------------------------------------------------------//
int m;
void solve()
{
	string s1;
	sd(m);
	cin>>s1;
	int n=s1.size();
	ll a=0,b=0;
	if(n==1)
	{
		cout<<"Bob "<<s1[0]-'a'+1;puts("");return;
	}
	if(s1.size()%2!=0)//奇数
	{
		for(int i=1;i<n-1;i++) a+=s1[i]-'a'+1;//alice先选必当择优选
		a+=max(s1[0],s1[n-1])-'a'+1;
		b=min(s1[0],s1[n-1])-'a'+1;
	}
	else
	{
		for(int i=0;i<n;i++) a+=s1[i]-'a'+1;
		b=0;
	}
	cout<<"Alice "<<a-b;
	puts("");

	
}

int main()
{
	int T;
	sd(T);
	while (T--)
	{
		solve();
	}
	return 0;
}